{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Highcharts Demos\n",
    "=================\n",
    "Basic line: http://www.highcharts.com/demo/line-basic\n",
    "------------------------------------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<iframe style=\"border:0;outline:none;overflow:hidden\" srcdoc=\"&lt;!DOCTYPE html&gt;\n",
       "&lt;html lang=&quot;en&quot;&gt;\n",
       "    &lt;head&gt;\n",
       "        &lt;meta charset=&quot;utf-8&quot; /&gt;\n",
       "        &lt;link href=&quot;https://www.highcharts.com/highslide/highslide.css&quot; rel=&quot;stylesheet&quot; /&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.highcharts.com/highcharts.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.highcharts.com/highcharts-more.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.highcharts.com/modules/exporting.js&quot;&gt;&lt;/script&gt;\n",
       "    &lt;/head&gt;\n",
       "    &lt;body style=&quot;margin:0;padding:0&quot;&gt;\n",
       "                &lt;div id=&quot;container&quot; style=&quot;&quot;&gt;Loading....&lt;/div&gt;\n",
       "\n",
       "\n",
       "    &lt;script&gt;\n",
       "        $(function(){\n",
       "\n",
       "\n",
       " \n",
       "\n",
       "\n",
       "\n",
       "\n",
       "            Highcharts.setOptions({&quot;lang&quot;: {}, &quot;global&quot;: {}});\n",
       "            var option = {&quot;loading&quot;: {}, &quot;subtitle&quot;: {}, &quot;xAxis&quot;: {&quot;categories&quot;: [&quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;, &quot;Jun&quot;, &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot;]}, &quot;title&quot;: {&quot;text&quot;: &quot;A New Highchart&quot;}, &quot;series&quot;: {}, &quot;labels&quot;: {}, &quot;yAxis&quot;: {&quot;plotLines&quot;: [{&quot;color&quot;: &quot;#808080&quot;, &quot;width&quot;: 1, &quot;value&quot;: 0}], &quot;title&quot;: {&quot;text&quot;: &quot;Temperature (\\u00b0C)&quot;}}, &quot;chart&quot;: {&quot;zoomType&quot;: &quot;x&quot;, &quot;renderTo&quot;: &quot;container&quot;}, &quot;tooltip&quot;: {&quot;valueSuffix&quot;: &quot;\\u00b0C&quot;}, &quot;plotOptions&quot;: {&quot;line&quot;: {&quot;dataLabels&quot;: {&quot;enabled&quot;: true}}}, &quot;credits&quot;: {&quot;enabled&quot;: false}, &quot;colors&quot;: {}, &quot;pane&quot;: {}, &quot;exporting&quot;: {}, &quot;drilldown&quot;: {}, &quot;navigation&quot;: {}, &quot;legend&quot;: {&quot;verticalAlign&quot;: &quot;middle&quot;, &quot;align&quot;: &quot;right&quot;, &quot;layout&quot;: &quot;vertical&quot;, &quot;borderWidth&quot;: 0}};\n",
       "\n",
       "\n",
       "            var data = [{&quot;data&quot;: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6], &quot;type&quot;: &quot;line&quot;, &quot;name&quot;: &quot;Tokyo&quot;}, {&quot;data&quot;: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5], &quot;type&quot;: &quot;line&quot;, &quot;name&quot;: &quot;New York&quot;}, {&quot;data&quot;: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0], &quot;type&quot;: &quot;line&quot;, &quot;name&quot;: &quot;Berlin&quot;}, {&quot;data&quot;: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8], &quot;type&quot;: &quot;line&quot;, &quot;name&quot;: &quot;London&quot;}]\n",
       "            option.series = data;\n",
       "\n",
       " \n",
       "\n",
       "            var chart = new Highcharts.Chart(option);\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       " \n",
       "\n",
       "\n",
       "        \n",
       "    });\n",
       "        &lt;/script&gt;\n",
       "\n",
       "    &lt;/body&gt;\n",
       "&lt;/html&gt;\" height=520 width=820></iframe>"
      ],
      "text/plain": [
       "<highcharts.highcharts.highcharts.Highchart at 0x7f650409e450>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from highcharts import Highchart\n",
    "H = Highchart()\n",
    "\n",
    "data_Tokyo = [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]\n",
    "data_NY = [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]\n",
    "data_Berlin = [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]\n",
    "data_London = [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]\n",
    "\n",
    "H.add_data_set(data_Tokyo, 'line', 'Tokyo')\n",
    "H.add_data_set(data_NY, 'line', 'New York')\n",
    "H.add_data_set(data_Berlin, 'line', 'Berlin')\n",
    "H.add_data_set(data_London, 'line', 'London')\n",
    "\n",
    "H.set_options('chart', {'zoomType': 'x'})\n",
    "H.set_options('xAxis', {'categories': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', \n",
    "\t'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']})\n",
    "\n",
    "H.set_options('yAxis',{ 'title': { 'text': 'Temperature (°C)'},\n",
    "            'plotLines': {'value': 0, 'width': 1, 'color': '#808080'}})\n",
    "H.set_options('tooltip', {'valueSuffix': '°C'})\n",
    "\n",
    "H.set_options('legend', {'layout': 'vertical','align': 'right',\n",
    "\t'verticalAlign': 'middle','borderWidth': 0})\n",
    "H.set_options('colors',{})\n",
    "H.set_options('plotOptions',{'line': {\n",
    "                'dataLabels': {\n",
    "                    'enabled': True\n",
    "                }}})\n",
    "\n",
    "H"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
